/**
 * @author 冯进茹
 * @time 2022-12-6 11:19
 * @description 封装登录接口
 */
import { AUTO_lOGIN, CHANGE_PASS_URL, LOGIN_URL, USER_INFO_URL, USER_ROLE_URL,USER_SAVE_URL } from '../config/url.config'
import Ajax from './Ajax'

export function loginApi(data){
    return Ajax({
        url:LOGIN_URL,
        data
    })
}
// 角色信息
export function userInfoApi(id) {
    return Ajax({
        url: USER_INFO_URL,
        method: 'GET',
        params: {id}
    })
}
//修改密码
export function changePassApi(data){
    return Ajax({
        url:CHANGE_PASS_URL,
        data
    })
}

//角色权限
export function userRoleApi(ids) {
    return Ajax({
        url: USER_ROLE_URL,
        method: 'GET',
        params: { ids }
    })
}

//免登录
export function autoLoginApi(){
    return Ajax({
        url:AUTO_lOGIN,
    })
}
